package 数组算法;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class reconstructQueue {

    public int[][] reconstructQueue(int[][] people) {

        List<int[]> list = new ArrayList<>();
        for (int[] arr : people) {
            list.add(arr);
        }
        Collections.sort(list, new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                if (o1[1] != o2[1]) {
                    return o1[0] - o2[0];
                } else {
                    return o1[1] - o2[1];
                }
            }
        });

        return null;
    }
}
